@include('admin.layout.bone_header')




<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">







    <div class="layui-form-item">
        <label class="layui-form-label">客服图片</label>
        <div class="layui-input-block">
            <button type="button" class="layui-btn" id="test1">客服图片</button>
            <input type="hidden" name="share_bg" id="img_url" value="{{$share_bg}}">
            <div class="layui-upload-list" >
                <img class="layui-upload-img" src="{{$share_bg}}"  id="img_url_show" width="92px" height="92px">
                <p id="demoText"></p>
            </div>
        </div>
    </div>






    {{--    配置返现队列相关--}}


    <div class="layui-form-item ">
        <input type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submit" id="submit" value="保存">
    </div>

</div>




<script src="/static/admin_templete/ueditor/ueditor.config.js"></script>
<script src="/static/admin_templete/ueditor/ueditor.all.min.js"></script>


<script>

</script>

<script>
    UI.upload('#test1',function (res) {
        if (res.code !== 200) {
            Utils.errorToast(res.msg);
        }else{
            Utils.successToast('上传成功');
            $('#img_url_show').attr('src',res['data']['src']);
            $('#img_url').val(res['data']['src']);
        }
    });


    layui.use(['laydate','form'], function() {
        let form = layui.form;


        form.on('submit(submit)', function(data){
            HttpUtils.post('{{route('admin.settings.settings')}}',data.field,function (res){
                if (res.code !== 200){
                    Utils.errorToast(res.msg);
                    return;
                }
                Utils.successToast(res.msg);
            })
        });
    });
</script>
@include('admin.layout.bone_footer')
